﻿/*using OpenCvSharp;
using Sdcb.PaddleInference;
using Sdcb.PaddleOCR;
using Sdcb.PaddleOCR.Models;
using Sdcb.PaddleOCR.Models.Local;

namespace Hr.Orc.Client.Helper
{
    public class OcrHelper
    {
        public static string OCRImageToText(string imagePath)
        {

            FullOcrModel model = LocalFullModels.ChineseV4;
            using (PaddleOcrAll all = new PaddleOcrAll(model, PaddleDevice.Openblas())
            {
                AllowRotateDetection = true,
                //允许识别有角度的文字
                Enable180Classification = false,
                // 允许识别旋转角度大于90度的文字
            })
            {
                try
                {
                    using (Mat src = Cv2.ImRead(imagePath))
                    {
                        PaddleOcrResult result = all.Run(src);
                        return result.Text;
                    }
                }
                catch (Exception ex)
                {
                    return "";
                }
            }
        }
    }
}
*/